<?php
/***************************************************************
*  Copyright notice
*  (c) 2009, jianyuzhu@gmail.com
*  All rights reserved
*  This script is part of the PPEMI project.
***************************************************************/

//
include_once(CONFIG_PATH . CONFIG_DIR_CLASSES . 'module/gallery/gallery.album.class.php');
include_once(CONFIG_PATH . CONFIG_DIR_CLASSES . 'module/gallery/gallery.image.class.php');

class GalleryBase extends GalleryAlbumBase {
	
	//constructor
	function GalleryBase() {
		parent::GalleryAlbumBase();
	}
	
	//methods
	function getItemsDetail($filter = '', $check = 0, $limit = true) {
		$ds = array();
		
		//
		$mObj = new GalleryImageBase();
		$mObj->format = true;
		
		//
		$items = $this->getItems($filter, $check, $limit);
		for($i=0, $n=sizeof($items); $i<$n; $i++) {
			$images = $mObj->getItems(array('aid:=' => $items[$i]['id']), 0, false);
			$ds[] = array('album' => $items[$i], 'items' => $images);
		}
		
		return $ds;
	}
}
//
?>